package entity;

public class Teacher extends Person {
    private Course course;

    // 子类构造方法，使用super调用父类构造方法
    public Teacher(String id, String name, String gender, Course course) {
        super(id, name, gender);
        this.course = course;
    }

    // 重写父类的打印工作单方法
    @Override
    public void printSchedule() {
        System.out.println("=== 教师授课表 ===");
        printInfo();
        if (course != null) {
            System.out.println("授课课程：" + course.getName());
            System.out.println("上课地点：" + course.getLocation());
            System.out.println("上课时间：" + course.getTime());
            System.out.println("选课学生：待实现学生列表");
        } else {
            System.out.println("暂无授课安排");
        }
        System.out.println();
    }

    public Course getCourse() { return course; }
    public void setCourse(Course course) { this.course = course; }
}